#!/usr/bin/env bash

dir=`pwd`

build(){
    for d in $(ls ./$1); do
        echo "building $dir/$1/main.go"
        pushd $dir/$1/ > /dev/null
        echo "path in `pwd`"
        CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build
		popd >/dev/null
    done
}

build service